
<div class="header">
    <b><?=$department_name?>&nbsp;&nbsp;&nbsp;&nbsp;<?=date('Y年m月d日',strtotime($params['start'])).'-'.date('Y年m月d日',strtotime($params['end']))?>&nbsp;&nbsp;&nbsp;&nbsp;主动离职：<?=$params['leave_type_1']?>人&nbsp;&nbsp;&nbsp;&nbsp;被动离职：<?=$params['leave_type_2']?>人</b>
</div>
<div class="body">
<!--在职列表 begain-->
<table cellpadding="0" cellspacing="0">
<thead>
    <tr>
        <th>直属主管</th>
        <th>离职员工</th>
        <th>职位</th>
        <th style="text-align: left;width: 350px;">原因</th>
    </tr>
</thead>
<tbody>
<?php if(!empty($user_list)):?>
    <?php foreach($user_list as $val):?>
    <?php foreach($val['attr'] as $k=>$value):?>
    <?php if($k==0):?>
    <tr>
        <td rowspan="<?=count($val['attr'])?>"><?=$val['parent']['user_name']?></td>
        <td><?=$value['user_name']?></td>
        <td><?=$value['position_name']?></td>
        <td style="text-align: left"><?php if($value['reason_id']!=14):?><?=htmlspecialchars($value['reason_info'])?><?php endif;?>&nbsp;<?php if($val['reason_id']==14):?><?=htmlspecialchars($value['reason_note'])?><?php endif;?></td>
    </tr>
    <?php else:?>
    <tr>
        <td><?=$value['user_name']?></td>
        <td><?=$value['position_name']?></td>
        <td style="text-align: left"><?php if($value['reason_id']!=14):?><?=htmlspecialchars($value['reason_info'])?><?php endif;?>&nbsp;<?php if($val['reason_id']==14):?><?=htmlspecialchars($value['reason_note'])?><?php endif;?></td>
    </tr>
    <?php endif;?>
<?php endforeach;?>
    <?php endforeach;?>
<?php endif;?>
</tbody>
</table>
<!--在职列表 end-->



</div>
<div class="footer">
</div>
    <?php $this->script_block_begin(); ?>
<script type="text/javascript">
</script>
    <?php $this->script_block_end(); ?>